{% extends 'kingadmin/table_index.html' %}
{% load tags %}

{% block container %}
<div class="row">
    <div class="panel panel-info" >
        <div class="panel-heading">
            <h3 class="panel-title">重置用户密码： {{ obj.name }}</h3>
        </div>
        <div class="panel-body col-lg-5">
            <form class="form-horizontal" role="form" method="post">{% csrf_token %}
                <div class="form-group">
                    <label class="col-sm-2 control-label" style="font-weight: normal">
                        用户名：
                    </label>
                    <div class="col-sm-6">
                        <input class="form-control" type="text" value="{{ obj.email }}" disabled>
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label" style="font-weight: normal">
                        密码：
                    </label>
                    <div class="col-sm-6">
                        <input class="form-control" type="password" name="password1">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label" style="font-weight: normal">
                        再次输入密码:
                    </label>
                    <div class="col-sm-6">
                        <input class="form-control" type="password" name="password2">
                    </div>
                </div>
                <div>
                    <ul style="color: red">
                        {% for k,v in errors.items %}
                        <li>{{ k }}:{{ v }}</li>
                        {% endfor %}
                    </ul>

                </div>
                <div class="form-group">
                    <input type="submit" class="btn btn-success pull-right" value="提交">
                </div>

            </form>
        </div>
    </div>
</div>
{% endblock %}